<form method="POST" action="<?=base_url()?>login/newuser" id="newuser_form">    
    <table align="center">
        <tr><td colspan="2"><h2>Korisnik</h2></td></tr>     
        <tr>
            <td> Ime:</td>
            <td> <input type="text" name="firstname" size="15" value="<?php echo set_value('firstname'); ?>" /> </td>
        </tr>
        <tr>
            <td> Prezime:</td>
            <td> <input type="text" name="lastname" size="15" value="<?php echo set_value('lastname'); ?>" /> </td>
        </tr>
        <tr>
            <td> Email:</td>
            <td> <input type="text" name="email" size="15" value="<?php echo set_value('email'); ?>" /> </td>
        </tr>
        <tr>
            <td> Lozinka:</td>
            <td> <input type="password" name="password_one" size="15" /> </td>
        </tr>
        <tr>
            <td> Lozinka ponovo:</td>
            <td> <input type="password" name="password_two" size="15" /> </td>
        </tr>
        <tr>
            <td> Tip korisnika: <? echo set_value('typeofuser'); ?></td>
            <td> 
                <select name="typeofuser">
                    <option value="0">-- Odaberite</option>
                    <?
                        foreach($typeofuser as $row){
                        ?><option value="<?=$row['id']?>" <? if($row['id']== set_value('typeofuser')) echo 'selected="selected"'; ?>><?=$row['description']?></option><?
                        }
                    ?>

                </select> 
            </td>
        </tr>
        <tr><td colspan="2" style="padding-top: 25px;"><h2>Korisničke dozvole</h2></td></tr>
        <tr>
            <td>
                <ul>
                    <li>mijenja tekstove CT</li>
                    <li>pravi izbor za prvu SF</li>
                    <li>sortira članke SA</li>
                </ul> 
            </td>
            <td>
                <ul>
                    <li>izmjena samo svojih EO</li>
                    <li>ispravljanje članaka ET</li>
                    <li>Baneri BN</li>
                </ul> 
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <a href="javascript:" class="btn" style="float: right; margin-top: 7px;" id="submit_form">Kreiraj korisnika</a>
            </td>
        </tr>
    </table>
</form>


<div id="actionwrapalign"> 
    <div id="actionwrap">

        <div id="actioninfowrap">
            <div id="actionclosewrap"><a href="javascript:" id="actionclose" ><img src="<?=base_url();?>assets/img/backgnds/x.png" border="0" width="25" height="29"></a></div>
            <div id="actioninfo">
                <?php echo validation_errors(); ?>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" 
    src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
    // You may specify partial version numbers, such as "1" or "1.3",
    //  with the same result. Doing so will automatically load the 
    //  latest version matching that partial revision pattern 
    //  (e.g. 1.3 would load 1.3.2 today and 1 would load 1.5.1).
    google.load("jquery", "1.5.1");

    google.setOnLoadCallback(function() {
        // Place init code here instead of $(document).ready()
        $(document).ready(function(){  
            $('#actionclose').live('click',function(){
                $('#actioninfo').html('Clear');
            })
            
            $('#submit_form').live('click',function(){
                $('#newuser_form').trigger('submit');
            })
        });
    });
</script>